package music_store.ms.dao;

import music_store.ms.pojo.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int checkByUsername(String username);

    User selectLogin(String username, String password);

    int checkUsername(String username);

    int checkEmail(String email);

    String selectQuestionByUsername(String username);

    int CheckAnswer(String username, String question, String answer);

    int updatePasswordByUsername(String username, String passwordNew);

    int checkPasswordByUsername(String username, String passwordOld);

    List<User> selectUserList();
}